NOTE:
In the five years since this was posted Swift has changed and it throws a Initialization of 'UnsafeBufferPointer<UInt8>' results in a dangling buffer pointer error on the return [UInt8]... line.
Topic:
Programming Languages
SubTopic:
Swift
Tags: